﻿using PoliticalClassifier.Support;
using System.Collections.Generic;

namespace PoliticalClassifier.DataSource
{
    /// <summary>
    /// Provides an internal implementation of a "some rows were omitted" warning.
    /// </summary>
    internal class DataSourceOmittedRowsWarning : DataSourceWarningBase
    {
        #region Construction
        /// <summary>
        /// Constructs a default "some rows were omitted" warning.
        /// </summary>
        public DataSourceOmittedRowsWarning()
            : base(DataSourceLoadWarningType.OmittedRows)
        {
            OmittedRowNumbers = new List<int>();
        }
        #endregion

        #region Public Properties
        /// <summary>
        /// Gets a list of row numbers that were omitted.
        /// </summary>
        public List<int> OmittedRowNumbers { get; private set; }
        #endregion

        #region Public Methods
        /// <summary>
        /// Gets a human readable warning message.
        /// </summary>
        /// <returns>A human readable warning message.</returns>
        public override string GetWarningMessage()
        {
            return string.Format(Resources.OmittedRowsWarningMessage, OmittedRowNumbers.Count);
        }
        #endregion
    }
}
